package com.jd.cmdb.tsc;

/**
 * Created by tianzhengguo on 2016/1/18.
 */
public enum TaskStateEnum {

    STATE_READY(Short.valueOf("0")){
        public String stateDesc(){return "就绪.";}
    },
    STATE_RUNNING(Short.valueOf("1")){
        public String stateDesc(){return "正在运行.";}
    },
    STATE_SUCCESS(Short.valueOf("2")){
        public String stateDesc(){return "成功.";}
    },
    STATE_WORKER_INNER_FAIL(Short.valueOf("3")){
        public String stateDesc(){return "WORKER内部错误.";}
    },
    STATE_WORKER_OUTER_FAIL(Short.valueOf("4")){
        public String stateDesc(){return "WORKER外部错误.";}
    };

    private short state;
    private TaskStateEnum(Short state){
        this.state = state;
    }

    public short getState(){
        return this.state;
    }

    public abstract String stateDesc();
}
